﻿using EmoneyWeiXinCommon;
using EmoneyWeiXinEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EmoneyWeiXinBLL
{
    public class ZouShiBll
    {
        public ZouShiEntity111 GetList111(string secucode)
        {
            try
            {
                string url = "http://gpys.emoney.cn/Handlers/SDHisHandlers.ashx?callback=jQuery161049053022076546504_1373425652793&Type=S&Code=" + secucode + "&Key=ggzs&_=1373425652809";
                string str = NetHelper.LoadData(url, null);
                ZouShiEntity111 list = new ZouShiEntity111();
                if (!string.IsNullOrEmpty(str))
                {
                    str = str.Replace("jQuery161049053022076546504_1373425652793([{success:1,msg:[", "").Replace("]}])", "");
                    list = JsonTools.ToObject<ZouShiEntity111>(str);
                }
                return list;

            }
            catch (Exception ex)
            {
                return null;
            }
        }


        public List<ZouShiEntity11> GetList11(string secucode)
        {
            try
            {
                string url = "http://gpys.emoney.cn/WebSD/Handlers/SDHisHandlers.ashx?Type=S&Code=" + secucode + "&Key=first&_=1373425328894";
                string str = NetHelper.LoadData(url, null);
                List<ZouShiEntity11> list = new List<ZouShiEntity11>();
                if (!string.IsNullOrEmpty(str))
                {
                    str = str.Replace("([{success:1,msg:", "").Replace("}])", "");
                    list = JsonTools.ToObject<List<ZouShiEntity11>>(str);
                }
                return list;

            }
            catch (Exception ex)
            {
                return null;
            }
        }
    }
}
